import KoaRouter from 'koa-router'
const router = new KoaRouter({ prefix: '/sys/depart' });
import { auth, hadAdminPermission } from '../middleware/auth.middleware';
import { verifyPageSize } from '../middleware/pagesize.middleware';
import { baseDepartValidator } from '../middleware/depart.middleware';
import departController from '../controller/depart.controller';

router.use(auth)
router.use(hadAdminPermission);
//创建信息
router.post('/create', baseDepartValidator, departController.create)
//删除信息
router.delete('/delete',departController.delete)
//更新信息
router.put('/update',departController.update)
//查询列表
router.get('/queryList',verifyPageSize,departController.queryList)

export default router;